package com.imelite.qyh.repository;


import com.imelite.qyh.base.ApplicationContextHelper;
import com.imelite.qyh.model.OrgDep;
import com.imelite.qyh.service.OrgDepService;

import java.util.List;

public class OrgDepRepository {
    private static OrgDepService orgDepService= (OrgDepService) ApplicationContextHelper.getBean("orgDepService");

    private static OrgDepRepository instance = null;
    public static synchronized OrgDepRepository getInstance() {
        if (instance == null) {
            instance = new OrgDepRepository();
        }
        return instance;
    }

    public static List<OrgDep> selectByCenter(){
        List<OrgDep> orgDepList=orgDepService.selectByCenter();
        return orgDepList;
    }
}
